{% extends 'base.html' %}
{% load timefilter %}
{% load static %}
{% block title %} 内存信息 {% endblock %}
{% block css %}<link href="{% static 'login.css' %}" rel="stylesheet"/>{% endblock %}

{% block content %}
     <div class="page-header"  style="margin-top: 60px">
        <a {% if not chart %}id="display"{% endif %} href="/memory_usage/">内存信息</a>
    </div>
    <div id="memory_info">
        <table class="table table-bordered">
            <tr>
                <td>总内存</td>
                <td>{{ memory_info.total | filesizeformat }}</td>
            </tr>
            <tr>
                <td>可用内存</td>
                <td>{{ memory_info.available | filesizeformat }}</td>
            </tr>
            <tr>
                <td>已用内存</td>
                <td>{{ memory_info.used | filesizeformat }}</td>
            </tr>
            <tr>
                <td>空闲内存</td>
                <td>{{ memory_info.free | filesizeformat }}</td>
            </tr>
            <tr>
                <td>内存使用率</td>
                <td>{{ memory_info.percent }} %</td>
            </tr>
        </table>
    </div>
{% endblock %}